package com.tomtaw.web.callnumber.ui.home;


import org.xwalk.core.JavascriptInterface;

public class WebJsManager {
    private IFragmentView mFragmentView;


    public WebJsManager(IFragmentView fragmentView) {
        mFragmentView = fragmentView;
    }

    @JavascriptInterface
    public void playTTS(String text)  {
       if (mFragmentView != null){
           mFragmentView.playTTS(text);
       }

    }

    @JavascriptInterface
    public void playAudio(String audioUrl)  {
        if (mFragmentView != null){
            mFragmentView.playAudio(audioUrl);
        }

    }

}
